// pluginDialog.h (c) 2011 JV Software
//

//
// FPluginDialog
//
class FPluginDialog {
public:
	virtual void				Init( int resourceId );
	virtual void				Show( void );
	virtual void				Hide( void );
	virtual void				OnCommand( int cmd );

	void						EnableControl( int res );
	int							GetSelectionFromControl( int res );
	void						AddMenu( int menuId );
	void						PopulateComboBox( int res, int numItems, FString *str );
	static  void				RegisterDialog( const FPluginDialog *dialog );
	static  FPluginDialog		*FindDialog( HWND hwnd );
	static LRESULT CALLBACK PluginDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
	static  void				DestroyAllDialogs( void );
private:
	HGLOBAL	dialogHandle;
	LPCDLGTEMPLATE pdlgTemplate;
	
public:
	HWND dialogHwnd;
	HMENU hMenu;
};